<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
    <title>Document</title>
</head>
<body>
<div id="app">
    <!--遍历数组-->
    <p v-for="(item,index) in arr" :key="index">我叫{{item.name}},我{{item.age}} 岁</p>
    <!-- 遍历对象-->
    <p v-for="(item,index) of obj" :key="index">我住{{item}}-{{index}}</p>
    <!-- 遍历字符串-->
    <p v-for="(item,index) of string" :key="index">{{item}} -{{index}}</p>
</div>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            arr:[
                {
                    name:'小黑',
                    age:18
                },
                {
                    name:'小白',
                    age:20
                }
            ],
            obj:{
                address:'市区',
                floor:'108号'
            },
            string:'青岛理工大学'

        }
    })
</script>
</body>

</html>

